<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<nav class="navbar-default navbar-static-side" role="navigation" th:fragment="navbar">
    <div class="sidebar-collapse">
        <ul class="nav metismenu" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element">
                    <span>
                        <img alt="image" class="img-circle" th:src="@{/static/img/profile_small.jpg}" />
                     </span>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="clear">
                            <span class="block m-t-xs">
                                <strong class="font-bold">[[${#httpServletRequest.remoteUser}]]</strong>
                            </span>
                        <span class="text-muted text-xs block">Art Director <b class="caret"></b></span></span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a href="profile.html">Profile</a></li>
                        <li><a href="contacts.html">Contacts</a></li>
                        <li><a href="mailbox.html">Mailbox</a></li>
                        <li class="divider"></li>
                        <li><a href="login.html">Logout</a></li>
                    </ul>
                </div>
                <div class="logo-element">
                    IN+
                </div>
            </li>
            <li th:each="m:${menu}">
                <a th:href="@{${m.url}?:'#'}">
                    <i th:class="${m.icon}"></i>
                    <span class="nav-label" th:text="${m.name}"></span>
                    <span class="fa arrow" th:if="${not #lists.isEmpty(m.children)}"></span>
                </a>
                <ul class="nav nav-second-level collapse" th:if="${not #lists.isEmpty(m.children)}">
                    <li th:each="s:${m.children}">
                        <a th:href="@{${s.url}}">
                            [[${s.name}]]
                            <span class="fa arrow" th:if="${not #lists.isEmpty(s.children)}"></span>
                        </a>
                        <ul class="nav nav-third-level" th:if="${not #lists.isEmpty(s.children)}">
                            <li th:each="t:${s.children}">
                                <a th:href="@{${t.url}}" th:text="${t.name}"></a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>

    </div>
</nav>
</html>